<?

Module::Init('system:structure');
BDS::Init();

class Filesystem extends BDS {

    protected static $table = "fs__files";
    static $id_name = "value_id";

    static function UploadFile($data) {
        
        $result = move_uploaded_file($data['tmp'], ROOT_DIR . $data['path']);
        if ($result) {
            unset($data['tmp']);
            $result = self::Create($data);
        }
        return $result;
    }

}
